Solaris port. Currently sees around 200 test failures, mostly related to Solaris not providing some of the locales that the test suite uses. Note: This depends on an xlocale (partial) implementation for Solaris and a couple of fixed standard headers. These will be committed to a branch later today. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151720 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/__locale b/include/__locale index 54afdf9..b1e0711 100644 --- a/include/__locale +++ b/include/__locale
@@ -21,7 +21,7 @@ #include <locale.h> #if _WIN32 # include <support/win32/locale_win32.h> -#elif (__GLIBC__ || __APPLE__ || __FreeBSD__) +#elif (__GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__) # include <xlocale.h> #endif // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD_ @@ -348,7 +348,19 @@ static const mask punct = _CTYPE_P; static const mask xdigit = _CTYPE_X; static const mask blank = _CTYPE_B; -#else // __GLIBC__ || _WIN32 || __APPLE__ || __FreeBSD__ +#elif __sun__ + typedef unsigned int mask; + static const mask space = _ISSPACE; + static const mask print = _ISPRINT; + static const mask cntrl = _ISCNTRL; + static const mask upper = _ISUPPER; + static const mask lower = _ISLOWER; + static const mask alpha = _ISALPHA; + static const mask digit = _ISDIGIT; + static const mask punct = _ISPUNCT; + static const mask xdigit = _ISXDIGIT; + static const mask blank = _ISBLANK; +#else // __GLIBC__ || _WIN32 || __APPLE__ || __FreeBSD__ || __sun__ typedef unsigned long mask; static const mask space = 1<<0; static const mask print = 1<<1;